<template>
	<div class="son">
		<h1>我是Son组件</h1>
		<button @click="sendCar">点我把车传给App</button>
	</div>
</template>

<script>
	export default {
		name:'Son',
		data() {
			return {
				car:'奔驰C63'
			}
		},
		methods: {
			sendCar(){
				this.$emit('get-car',this.car,500)
			}
		},
	}
</script>

<style>
	.son{
		background-color: skyblue;
		padding: 20px;
	}
</style>